import java.util.Random;
import java.util.Scanner;
public class 混合运算 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        Random random = new Random();
        int num1, num2, operator, answer, userAnswer, count = 0;
        while (count < 10) {
            num1 = random.nextInt(101);
            num2 = random.nextInt(101);
            operator = random.nextInt(4);
            switch (operator) {
                case 0:
                    answer = num1 + num2;
                    System.out.println(num1 + "+" + num2 + "=");
                    break;
                case 1:
                    answer = num1 - num2;
                    System.out.println(num1 + "-" + num2 + "=");
                    break;
                case 2:
                    answer = num1 * num2;
                    System.out.println(num1 + "*" + num2 + "=");
                    break;
                case 3:
                    answer = num1 * num2;
                    System.out.println(num1 + "/" + num2 + "=");
                    break;
                default:
                    answer =0;
                    break;
            }
            userAnswer = input.nextInt();
            if (userAnswer == answer) {
                System.out.println("你做对了");
            } else {
                System.out.println("你错了！正确答案应该是" + answer);
            }


        }
    }
}

